Accusoft.ImagXpress13.ActiveX
Modify Alpha Channel

ImagXpress® supports processing alpha channel information to manage transparency in images. Alpha channels are supported for PNG, Targa, and TIFF files. While not typical, ImagXpress also supports alpha channel for BMP and ICO files. If the image is saved to a format which does not support alpha channel, the alpha channel will be dropped.

Add Alpha Channel to an Image

To add an alpha channel to a 24-bit image, call AlphaAdd, specifying an hDib with the desired alpha channel information. The current image (ProcessImageID) will be converted to a 32-bit image, including the new alpha channel.

The image must be 24-bit prior to calling AlphaAdd, or an exception is thrown.

The image must be a 32-bit image including alpha information prior to calling AlphaFlatten, or an exception is thrown.

Remove an Alpha Channel from an Image

To remove an alpha channel from a 32-bit image, call AlphaRemove, which converts the to a 24-bit image without an alpha channel. The alpha channel information is not saved.

The image must be a 32-bit image including alpha information prior to calling AlphaFlatten, or an exception is thrown.

Flatten an Alpha Channel Image

Call AlphaFlatten to blend the 32-bit image's alpha channel plane with a specified color to create a blended 24-bit image. The resulting image has transparency information stored in the specified color within the 24-bit color spectrum.

The image must be a 32-bit image including alpha information prior to calling AlphaFlatten, or an exception is thrown.

Read Alpha Channel information

To get the alpha value at a specified X and Y location in the image, call AlphaGet.

To get the entire alpha channel plane associated with the image, call AlphaReturn. The alpha plane will be stored to an  hDib.

Modify Alpha Channel Information

To set an alpha value at a specified X and Y location in the image, call AlphaSet.

To modify transparency levels across the image, select one of the following options:

If no region is specified, the entire alpha channel is set with the specified value.

Process an Image that Contains Alpha Channel

All image processing methods in ImagXpress support alpha channel, with the following exceptions:

Swirl, Pinch, PWarp, Ripple, Blur, Perspective do NOT support alpha channel.

These processes distort the image, and therefore drop the alpha channel.

See Also

 

 


©2018. Accusoft Corporation. All Rights Reserved.

Send Feedback